package com.lsu.observer.practice;

/**
 * 杀手类
 *
 * @Author wang suo
 * @Date 2020/10/22 0022 8:21
 * @Version 1.0
 */
public class Killer implements Observer {

    private String name;
    private Subject luSu;

    public Killer(String name) {
        this.name = name;
    }

    public void setLuSu(Subject luSu) {
        this.luSu = luSu;
        luSu.addObserver(this);
    }

    @Override
    public void update() {
        System.out.println(name + "杀关羽!");
    }
}
